<%@page import="Bean.eboardBean"%>
<%@page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
	eboardBean data = (eboardBean)request.getAttribute("up​​datelist");
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="/bigjo/js/jquery.js"></script>
<link rel="stylesheet" type="text/css" href="/bigjo/css/eboard.css">
<title>EVENT</title>
</head>

<script type="text/javascript">

function updateform(){
	var form = document.insert;
	if(!form.eb_title.value){
		alert('제목은 필수');
		return;
	}
	if(!form.eb_context.value){
		alert('내용도 필수');
		return;
	}else{
		document.insert.submit();
		document.getElementById("update").action = "/bigjo/eboardupdate.eboard";
	}
}

</script>

<body>
	<jsp:include page="/upMenu.main"></jsp:include>
	<div id="eboarddetail" align="center">
		<form name="insert" action="/bigjo/eboardupdate.eboard" method="post">
		<table border="1" style="width: 700px">
			<thead>
				<tr>
					<th align="center" colspan="6">수정 페이지</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td align="center">번호</td>
					<td align="left"> <input name="eb_no"  value="<%=data.getEb_no() %>"></td>
				</tr>
				<tr>
					<td align="center">조회수</td>
					<td align="left"><input name="eb_count"  value=" <%=data.getEb_count() %>"></td>
				</tr>
				<tr>
					<td align="center">제목</td>
					<td align="left"><input name="eb_title" id="eb_title" style="width:620px;" value="<%=data.getEb_title() %>"></td>
				</tr>

				<tr>
					<td align="center">내용</td>
					<td align="left"><textarea name="eb_context" id="eb_context"  style="width: 620px; height: 220px; resize: none;"><%=data.getEb_context() %></textarea>
					</td>
				</tr>
			</tbody>
		</table>
		
		<input type="button" onclick="updateform()" name="update" id="update" value="수정">
		
		<a href="eboardmain.eboard"><input type="button" value="목록으로"></a>
		
		</form>
	</div>
</body>
</html>